<?php
class Article_Model_Singlearticle {
	
	private $secure;
	private $articleData;
	private $addComments;
	
	public function __construct(){
		$this->secure = new Core_Data_Secure();
		$this->articleData = new Article_Data_Singlearticle;
		$this->addComments = new Article_Data_Comments();
	}
	
	public function getArticle(array $getVars, array $postVars){
		$getVars = $this->secure->parseData($getVars);
		if(isset($_POST['title'])){
			$this->addComments->addValues($postVars);
		}
		$article = $this->articleData->getData($getVars);
		return $article;
	}
	
}